<!DOCTYPE html>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:set var="contextPath" value="${pageContext.request.contextPath}" />
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>图片浏览页面</title>
<script type="text/javascript" src="${contextPath}/js/jquery.min.js"></script>
<style type="text/css">
.side-bar a,.chat-tips i {
	background: url(right_bg.png) no-repeat;
}

.side-bar {
	width: 66px;
	position: fixed;
	bottom: 20px;
	right: 25px;
	font-size: 0;
	line-height: 0;
	z-index: 100;
}

.side-bar a {
	width: 66px;
	height: 66px;
	display: inline-block;
	background-color: #ddd;
	margin-bottom: 2px;
	background-image: url('../images/print.png');
	background-repeat: no-repeat;
	background-position: center;
}

.side-bar a:hover {
	background-color: #669fdd;
}

.side-bar .icon-qq {
	background-position: 0 -62px;
}

.side-bar .icon-chat {
	background-position: 0 -130px;
	position: relative;
}



.side-bar .icon-mail {
	background-position: 0 -266px;
}

.side-bar .icon-chat:hover .chat-tips {
	display: block;
}

.chat-tips {
	padding: 20px;
	border: 1px solid #d1d2d6;
	position: absolute;
	right: 78px;
	top: -55px;
	background-color: #fff;
	display: none;
}

.chat-tips i {
	width: 9px;
	height: 16px;
	display: inline-block;
	position: absolute;
	right: -9px;
	top: 80px;
	background-position: -88px -350px;
}

.chat-tips img {
	width: 138px;
	height: 138px;
}
</style>
</head>
<body>
	<c:if test="${type eq 'pdf' }">
		<c:forEach items="${src}" var="item">
			<embed id="pdf" width="100%" src="${contextPath}/${src}"
				type="application/pdf">
		</c:forEach>
		<script type="text/javascript">
			$(document).ready(function() {
				var height = document.documentElement.clientHeight - 20;
				$("#pdf").css("height", height);
				var src = $("#pdf").attr("src");
			});
		</script>
	</c:if>
	<c:if test="${type eq 'img' }">
		<c:forEach items="${src}" var="item">
			<img width="100%" src="${contextPath}/${item}" />
		</c:forEach>
	</c:if>
	<div class="side-bar">
		<a href="javascript:print();" class="icon-blog">打印</a>
	</div>
</body>
</html>
